./create_newcase --case test_ecmwf_2011_2018 --res hcru_hcru --compset I2000Clm50SpGs --run-unsupported --compiler gnu --mach ubuntu
cd test_ecmwf_2011_2018

./xmlchange DATM_MODE='CLM1PT'
./xmlchange NTASKS=80
./xmlchange DATM_CLMNCEP_YR_ALIGN=2011
./xmlchange DATM_CLMNCEP_YR_START=2011
./xmlchange DATM_CLMNCEP_YR_END=2018
./xmlchange DIN_LOC_ROOT=/home/dayon/inputdata
./xmlchange DIN_LOC_ROOT_CLMFORC=/home/dayon/inputdata/Ecmwf
./xmlchange RUN_STARTDATE=2011-01-01
./xmlchange STOP_N=8
./xmlchange STOP_OPTION=nyears
./xmlchange CLM_FORCE_COLDSTART='on'
./xmlchange REST_OPTION=nyears
./xmlchange REST_N=1

./case.setup

vi user_nl_clm
hist_mfilt = 12
hist_nhtfrq = 0
fsurdat = '/home/dayon/inputdata/lnd/clm2/surfdata_map/surfdata_360x720cru_16pfts_Irrig_CMIP6_simyr2000_c170824.nc'

vi user_nl_datm

./preview.namelist

./case.build --skip-provenance-check
./case.submit --skip-preview-namelist

# ==========================================================
# CLM50SpGs_hcru_testrest
# ==========================================================
./create_newcase --case CLM50SpGs_hcru_testrest --res hcru_hcru --compset I2000Clm50SpGs --run-unsupported --compiler gnu --mach ubuntu
cd CLM50SpGs_hcru_ecmwf

./xmlchange DATM_MODE='CLM1PT'
./xmlchange NTASKS=80
./xmlchange DATM_CLMNCEP_YR_ALIGN=1980
./xmlchange DATM_CLMNCEP_YR_START=1980
./xmlchange DATM_CLMNCEP_YR_END=1980
./xmlchange DIN_LOC_ROOT=/home/dayon/inputdata
./xmlchange DIN_LOC_ROOT_CLMFORC=/home/dayon/inputdata/Ecmwf
./xmlchange RUN_STARTDATE=1980-01-01
./xmlchange STOP_N=6
./xmlchange STOP_OPTION=ndays
./xmlchange CLM_FORCE_COLDSTART='on'
./xmlchange REST_N=2
./xmlchange REST_OPTION=ndays

./case.setup

vi user_nl_clm
hist_mfilt = 1
hist_nhtfrq = -24
fsurdat = '/home/dayon/inputdata/lnd/clm2/surfdata_map/surfdata_360x720cru_16pfts_Irrig_CMIP6_simyr2000_c170824.nc'

vi user_nl_datm

./preview.namelists
# comment hang 229

./case.build --skip-provenance-check
./case.submit --skip-preview-namelist

# ==========================================================
# CLM50SpGs_r1D_1980_2000
# ==========================================================
./create_newcase --case CLM50SpGs_r1D_1980_2000 --res CLM_USRDAT --compset I2000Clm50SpGs --run-unsupported --compiler gnu --mach ubuntu
cd CLM50SpGs_r1D_1980_2000

./xmlchange DATM_MODE='CLM1PT'
./xmlchange NTASKS=80
./xmlchange DATM_CLMNCEP_YR_ALIGN=1980
./xmlchange DATM_CLMNCEP_YR_START=1980
./xmlchange DATM_CLMNCEP_YR_END=2000
./xmlchange DIN_LOC_ROOT=/home/dayon/inputdata
./xmlchange DIN_LOC_ROOT_CLMFORC=/home/dayon/inputdata/Ecmwf
./xmlchange RUN_STARTDATE=1980-01-01
./xmlchange STOP_N=21
./xmlchange STOP_OPTION=nyears
./xmlchange CLM_FORCE_COLDSTART='on'
./xmlchange REST_N=1
./xmlchange REST_OPTION=nyears
./xmlchange ATM_DOMAIN_FILE=domain.lnd.360x180pt_ECMWF.c201225.nc
./xmlchange LND_DOMAIN_FILE=domain.lnd.360x180pt_ECMWF.c201225.nc

./case.setup

vi user_nl_clm
hist_mfilt = 12
hist_nhtfrq = 0
fsurdat = '/home/dayon/inputdata/lnd/clm2/surfdata_map/surfdata_360x180pt_ECMWF_hist_16pfts_Irrig_CMIP6_simyr2000_c201203.nc'

vi user_nl_datm

./preview.namelists
# comment hang 229

./case.build --skip-provenance-check
./case.submit --skip-preview-namelist

# ==========================================================
# CLM50SpGs_r1D_2011_2018
# ==========================================================
./create_newcase --case CLM50SpGs_r1D_2011_2018 --res CLM_USRDAT --compset I2000Clm50SpGs --run-unsupported --compiler gnu --mach ubuntu
cd CLM50SpGs_r1D_2011_2018

./xmlchange DATM_MODE='CLM1PT'
./xmlchange NTASKS=80
./xmlchange DATM_CLMNCEP_YR_ALIGN=2011
./xmlchange DATM_CLMNCEP_YR_START=2011
./xmlchange DATM_CLMNCEP_YR_END=2018
./xmlchange DIN_LOC_ROOT=/home/dayon/inputdata
./xmlchange DIN_LOC_ROOT_CLMFORC=/home/dayon/inputdata/Ecmwf
./xmlchange RUN_STARTDATE=2011-01-01
./xmlchange STOP_N=8
./xmlchange STOP_OPTION=nyears
./xmlchange CLM_FORCE_COLDSTART='on'
./xmlchange REST_N=1
./xmlchange REST_OPTION=nyears
./xmlchange ATM_DOMAIN_FILE=domain.lnd.360x180pt_ECMWF.c201225.nc
./xmlchange LND_DOMAIN_FILE=domain.lnd.360x180pt_ECMWF.c201225.nc

./case.setup

vi user_nl_clm
hist_mfilt = 12
hist_nhtfrq = 0
fsurdat = '/home/dayon/inputdata/lnd/clm2/surfdata_map/surfdata_360x180pt_ECMWF_hist_16pfts_Irrig_CMIP6_simyr2000_c201203.nc'

vi user_nl_datm

./preview.namelists
# comment hang 229

./case.build --skip-provenance-check
./case.submit --skip-preview-namelist

# ==========================================================
# CLM50SpGs_r1D_ctl
# ==========================================================
./create_newcase --case CLM50SpGs_r1D_ctl --res CLM_USRDAT --compset I2000Clm50SpGs --run-unsupported --compiler gnu --mach ubuntu
cd CLM50SpGs_r1D_ctl

./xmlchange DATM_MODE='CLM1PT'
./xmlchange NTASKS=80
./xmlchange DATM_CLMNCEP_YR_ALIGN=1980
./xmlchange DATM_CLMNCEP_YR_START=1980
./xmlchange DATM_CLMNCEP_YR_END=2018
./xmlchange DIN_LOC_ROOT=/home/dayon/inputdata
./xmlchange DIN_LOC_ROOT_CLMFORC=/home/dayon/inputdata/Ecmwf
./xmlchange RUN_STARTDATE=1980-01-01
./xmlchange STOP_N=39
./xmlchange STOP_OPTION=nyears
./xmlchange CLM_FORCE_COLDSTART='on'
./xmlchange ATM_NCPL=24
./xmlchange REST_N=1
./xmlchange REST_OPTION=nyears
./xmlchange ATM_DOMAIN_FILE=domain.lnd.360x180pt_ECMWF.c201225.nc
./xmlchange LND_DOMAIN_FILE=domain.lnd.360x180pt_ECMWF.c201225.nc

./case.setup
vi user_nl_clm
hist_fincl2='QVEGE','QVEGT','QSOIL'
hist_dov2xy=.true.,.false.
hist_type1d_pertape='GRID','PFTS'
hist_avgflag_pertape='A','A'
hist_mfilt=1,24
hist_nhtfrq=0,1
fsurdat = '/home/dayon/inputdata/lnd/clm2/surfdata_map/surfdata_360x180pt_ECMWF_hist_16pfts_Irrig_CMIP6_simyr2000_c201203.nc'

vi user_nl_datm
-----

./preview.namelists
vi /home/dayon/cesm2_1_3/cime/src/components/data_comps/datm/cime_config/buildnml
# comment hang 229
sed -n '229p' /home/dayon/cesm2_1_3/cime/src/components/data_comps/datm/cime_config/buildnml

# copy streams files

./case.build --skip-provenance-check
./case.submit --skip-preview-namelist


# ==========================================================
# CLM_test_dtime
# ==========================================================
./create_newcase --case CLM_test_dtime --res CLM_USRDAT --compset I2000Clm50SpGs --run-unsupported --compiler gnu --mach ubuntu
cd CLM_test_dtime

./xmlchange DATM_MODE='CLM1PT'
./xmlchange NTASKS=80
./xmlchange DATM_CLMNCEP_YR_ALIGN=2011
./xmlchange DATM_CLMNCEP_YR_START=2011
./xmlchange DATM_CLMNCEP_YR_END=2018
./xmlchange DIN_LOC_ROOT=/home/dayon/inputdata
./xmlchange DIN_LOC_ROOT_CLMFORC=/home/dayon/inputdata/Ecmwf
./xmlchange RUN_STARTDATE=2011-01-01
./xmlchange STOP_N=15
./xmlchange STOP_OPTION=ndays
./xmlchange ATM_NCPL=24
./xmlchange CLM_FORCE_COLDSTART='on'
./xmlchange ATM_DOMAIN_FILE=domain.lnd.360x180pt_ECMWF.c201225.nc
./xmlchange LND_DOMAIN_FILE=domain.lnd.360x180pt_ECMWF.c201225.nc

./case.setup

vi user_nl_clm
hist_mfilt = 24
hist_nhtfrq = -1
fsurdat = '/home/dayon/inputdata/lnd/clm2/surfdata_map/surfdata_360x180pt_ECMWF_hist_16pfts_Irrig_CMIP6_simyr2000_c201203.nc'

vi user_nl_datm

./preview.namelists
# comment hang 229

./case.build --skip-provenance-check
./case.submit --skip-preview-namelist

# ==========================================================
# CLM50SpGs_GSWP_r1D
# ==========================================================
./create_newcase --case CLM50SpGs_GSWP_r1D --res CLM_USRDAT --compset I2000Clm50SpGs --run-unsupported --compiler gnu --mach ubuntu
cd CLM50SpGs_GSWP_r1D

./xmlchange NTASKS=80
./xmlchange DATM_CLMNCEP_YR_ALIGN=1980
./xmlchange DATM_CLMNCEP_YR_START=1980
./xmlchange DATM_CLMNCEP_YR_END=2014
./xmlchange DIN_LOC_ROOT=/home/dayon/inputdata
./xmlchange DIN_LOC_ROOT_CLMFORC=/home/dayon/inputdata/lmwg
./xmlchange RUN_STARTDATE=1980-01-01
./xmlchange STOP_N=35
./xmlchange STOP_OPTION=nyears
./xmlchange CLM_FORCE_COLDSTART='on'
./xmlchange ATM_NCPL=24
./xmlchange REST_N=1
./xmlchange REST_OPTION=nyears
./xmlchange ATM_DOMAIN_FILE=domain.lnd.360x180pt_ECMWF.c201225.nc
./xmlchange LND_DOMAIN_FILE=domain.lnd.360x180pt_ECMWF.c201225.nc

./case.setup

vi user_nl_clm
hist_mfilt = 12
hist_nhtfrq = 0
fsurdat = '/home/dayon/inputdata/lnd/clm2/surfdata_map/surfdata_360x180pt_ECMWF_hist_16pfts_Irrig_CMIP6_simyr2000_c201203.nc'

./case.build --skip-provenance-check
./case.submit --skip-preview-namelist

# ==========================================================
# CLM50SpGs_hcru_China_ecmwf
# ==========================================================
./create_newcase --case CLM50SpGs_hcru_China_ecmwf --res CLM_USRDAT --compset I2000Clm50SpGs --run-unsupported --compiler gnu --mach ubuntu
cd CLM50SpGs_hcru_China_ecmwf

./xmlchange DATM_MODE='CLM1PT'
./xmlchange NTASKS=80
./xmlchange DATM_CLMNCEP_YR_ALIGN=1980
./xmlchange DATM_CLMNCEP_YR_START=1980
./xmlchange DATM_CLMNCEP_YR_END=2018
./xmlchange DIN_LOC_ROOT=/home/dayon/inputdata
./xmlchange DIN_LOC_ROOT_CLMFORC=/home/dayon/inputdata/Ecmwf
./xmlchange RUN_STARTDATE=1980-01-01
./xmlchange STOP_N=39
./xmlchange STOP_OPTION=nyears
./xmlchange CLM_FORCE_COLDSTART='on'
./xmlchange ATM_NCPL=24
./xmlchange REST_N=1
./xmlchange REST_OPTION=nyears
./xmlchange ATM_DOMAIN_FILE=domain.lnd.80x140cru_R05d_China_c201204.nc
./xmlchange LND_DOMAIN_FILE=domain.lnd.80x140cru_R05d_China_c201204.nc

./case.setup
vi user_nl_clm
hist_fincl2='QVEGE','QVEGT','QSOIL'
hist_dov2xy=.true.,.false.
hist_type1d_pertape='GRID','PFTS'
hist_avgflag_pertape='A','A'
hist_mfilt=1,24
hist_nhtfrq=0,1
fsurdat = '/home/dayon/inputdata/lnd/clm2/surfdata_map/surfdata_80x140cru_R05d_16pfts_Irrig_CMIP6_simyr2000_c201204.nc'

vi user_nl_datm
-----add datm_in context ------

./preview.namelists
vi /home/dayon/cesm2_1_3/cime/src/components/data_comps/datm/cime_config/buildnml
# comment hang 229
sed -n '229p' /home/dayon/cesm2_1_3/cime/src/components/data_comps/datm/cime_config/buildnml

# copy streams files

./case.build --skip-provenance-check
./case.submit --skip-preview-namelist

# ==========================================================
# CLM50SpGs_hcru_China_GSWP
# ==========================================================
./create_newcase --case CLM50SpGs_hcru_China_GSWP --res CLM_USRDAT --compset I2000Clm50SpGs --run-unsupported --compiler gnu --mach ubuntu
cd CLM50SpGs_hcru_China_GSWP

./xmlchange NTASKS=80
./xmlchange DATM_CLMNCEP_YR_ALIGN=1980
./xmlchange DATM_CLMNCEP_YR_START=1980
./xmlchange DATM_CLMNCEP_YR_END=2014
./xmlchange DIN_LOC_ROOT=/home/dayon/inputdata
./xmlchange DIN_LOC_ROOT_CLMFORC=/home/dayon/inputdata/lmwg
./xmlchange RUN_STARTDATE=1980-01-01
./xmlchange STOP_N=35
./xmlchange STOP_OPTION=nyears
./xmlchange CLM_FORCE_COLDSTART='on'
./xmlchange ATM_NCPL=24
./xmlchange REST_N=1
./xmlchange REST_OPTION=nyears
./xmlchange ATM_DOMAIN_FILE=domain.lnd.80x140cru_R05d_China_c201204.nc
./xmlchange LND_DOMAIN_FILE=domain.lnd.80x140cru_R05d_China_c201204.nc

./case.setup

vi user_nl_clm
hist_mfilt = 12
hist_nhtfrq = 0
fsurdat = '/home/dayon/inputdata/lnd/clm2/surfdata_map/surfdata_80x140cru_R05d_16pfts_Irrig_CMIP6_simyr2000_c201204.nc'

./case.build --skip-provenance-check
./case.submit --skip-preview-namelist

# ==========================================================
# CLM50SpGs_r1D_ECMWF_in_namelist
# ==========================================================
./create_newcase --case CLM50SpGs_r1D_ECMWFv11 --res CLM_USRDAT --compset I2000Clm50SpGs --run-unsupported --compiler gnu --mach ubuntu
cd CLM50SpGs_r1D_ECMWFv11

./xmlchange DATM_MODE='ECMWF'
./xmlchange NTASKS=80
./xmlchange DATM_CLMNCEP_YR_ALIGN=2018
./xmlchange DATM_CLMNCEP_YR_START=2018
./xmlchange DATM_CLMNCEP_YR_END=2018
./xmlchange DIN_LOC_ROOT=/home/dayon/inputdata
./xmlchange DIN_LOC_ROOT_CLMFORC=/home/dayon/inputdata/Ecmwf
./xmlchange RUN_STARTDATE=2018-01-01
./xmlchange STOP_N=1
./xmlchange STOP_OPTION=nmonths
./xmlchange CLM_FORCE_COLDSTART='on'
./xmlchange ATM_NCPL=24
./xmlchange REST_N=1
./xmlchange REST_OPTION=nyears
./xmlchange ATM_DOMAIN_FILE=domain.lnd.360x180pt_ECMWF.c201225.nc
./xmlchange LND_DOMAIN_FILE=domain.lnd.360x180pt_ECMWF.c201225.nc

./case.setup

vi user_nl_clm
hist_mfilt = 1
hist_nhtfrq = -24
fsurdat = '/home/dayon/inputdata/lnd/clm2/surfdata_map/surfdata_360x180pt_ECMWF_hist_16pfts_Irrig_CMIP6_simyr2000_c201203.nc'

vi user_nl_datm

./case.build --skip-provenance-check
./case.submit --skip-preview-namelist


# ==========================================================
# CLM50SpGs_res1D_CTRL
# ==========================================================
./create_newcase --case CLM50SpGs_res1D_CTRL --res CLM_USRDAT --compset I2000Clm50SpGs --run-unsupported --compiler gnu --mach ubuntu
cd CLM50SpGs_res1D_CTRL

./xmlchange DATM_MODE='ECMWF'
./xmlchange NTASKS=80
./xmlchange DATM_CLMNCEP_YR_ALIGN=1980
./xmlchange DATM_CLMNCEP_YR_START=1980
./xmlchange DATM_CLMNCEP_YR_END=2018
./xmlchange DIN_LOC_ROOT=/home/dayon/inputdata
./xmlchange DIN_LOC_ROOT_CLMFORC=/home/dayon/inputdata/Ecmwf
./xmlchange RUN_STARTDATE=1980-01-01
./xmlchange STOP_N=39
./xmlchange STOP_OPTION=nyears
./xmlchange CLM_FORCE_COLDSTART='on'
./xmlchange ATM_NCPL=24
./xmlchange REST_N=1
./xmlchange REST_OPTION=nyears
./xmlchange ATM_DOMAIN_FILE=domain.lnd.360x180pt_ECMWF.c201225.nc
./xmlchange LND_DOMAIN_FILE=domain.lnd.360x180pt_ECMWF.c201225.nc

./case.setup

vi user_nl_clm
hist_fincl2='QVEGE','QVEGT','QSOIL'
hist_dov2xy=.true.,.false.
hist_type1d_pertape='GRID','PFTS'
hist_avgflag_pertape='A','A'
hist_mfilt=1,24 
hist_nhtfrq=0,1
fsurdat = '/home/dayon/inputdata/lnd/clm2/surfdata_map/surfdata_360x180pt_ECMWF_hist_16pfts_Irrig_CMIP6_simyr2000_c201203.nc'

vi user_nl_datm

./case.build --skip-provenance-check
./case.submit --skip-preview-namelist

# ==========================================================
# CLM50SpGs_res1D_CLMGLEAM
# ==========================================================
./create_newcase --case CLM50SpGs_res1D_CLMGLEAM --res CLM_USRDAT --compset I2000Clm50SpGs --run-unsupported --compiler gnu --mach ubuntu
cd CLM50SpGs_res1D_CLMGLEAM

./xmlchange DATM_MODE='ECMWF'
./xmlchange NTASKS=80
./xmlchange DATM_CLMNCEP_YR_ALIGN=2000
./xmlchange DATM_CLMNCEP_YR_START=2000
./xmlchange DATM_CLMNCEP_YR_END=2018
./xmlchange DIN_LOC_ROOT=/home/dayon/inputdata
./xmlchange DIN_LOC_ROOT_CLMFORC=/home/dayon/inputdata/Ecmwf
./xmlchange RUN_STARTDATE=2000-01-01
./xmlchange STOP_N=19
./xmlchange STOP_OPTION=nyears
./xmlchange CLM_FORCE_COLDSTART='on'
./xmlchange ATM_NCPL=24
./xmlchange REST_N=1
./xmlchange REST_OPTION=nyears
./xmlchange ATM_DOMAIN_FILE=domain.lnd.360x180pt_ECMWF.c201225.nc
./xmlchange LND_DOMAIN_FILE=domain.lnd.360x180pt_ECMWF.c201225.nc

./case.setup

vi user_nl_clm
hist_mfilt=1,12
hist_nhtfrq=-24,0
fsurdat = '/home/dayon/inputdata/lnd/clm2/surfdata_map/surfdata_360x180pt_ECMWF_hist_16pfts_Irrig_CMIP6_simyr2000_c201203.nc'

vi user_nl_datm

&datm_nml
  decomp = "1d"
  factorfn = "null"
  force_prognostic_true = .false.
  iradsw = 1
  presaero = .true.
  restfilm = "undefined"
  restfils = "undefined"
  wiso_datm = .false.
/
&shr_strdata_nml
  datamode = "CLMNCEP"
  domainfile = "/home/dayon/inputdata/share/domains/domain.lnd.360x180pt_ECMWF.c201225.nc"
  dtlimit = 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5
  fillalgo = "nn", "nn", "nn", "nn", "nn", "nn", "nn", "nn", "nn"
  fillmask = "nomask", "nomask", "nomask", "nomask", "nomask", "nomask", "nomask", "nomask", "nomask"
  fillread = "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET"
  fillwrite = "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET"
  mapalgo = "bilinear", "bilinear", "bilinear", "bilinear", "bilinear", "bilinear", "bilinear", "bilinear", "bilinear"
  mapmask = "nomask", "nomask", "nomask", "nomask", "nomask", "nomask", "nomask", "nomask", "nomask"
  mapread = "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET"
  mapwrite = "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET"
  readmode = "single", "single", "single", "single", "single", "single", "single", "single", "single"
  streams = "datm.streams.txt.ECMWF.Solar 2000 2000 2018",
      "datm.streams.txt.ECMWF.Precip 2000 2000 2018",
      "datm.streams.txt.ECMWF.Tair 2000 2000 2018",
      "datm.streams.txt.ECMWF.Psurf 2000 2000 2018",
      "datm.streams.txt.ECMWF.Qair 2000 2000 2018",
      "datm.streams.txt.ECMWF.Wind 2000 2000 2018",
      "datm.streams.txt.ECMWF.LWdown 2000 2000 2018",
      "datm.streams.txt.presaero.clim_2000 1 2000 2000",
      "datm.streams.txt.topo.observed 1 1 1"
  taxmode = "cycle", "cycle", "cycle", "cycle", "cycle", "cycle", "cycle", "cycle", "cycle"
  tintalgo = "nearest", "nearest", "nearest", "nearest", "nearest", "nearest", "nearest", "linear", "lower"
  vectors = "null"
/


./case.build --skip-provenance-check
./case.submit --skip-preview-namelist

# ==========================================================
# CLM50SpGs_res1D_CLMGLEAMv35udp
# ==========================================================
./create_newcase --case CLM50SpGs_res1D_CLMGLEAMv35udp --res CLM_USRDAT --compset I2000Clm50SpGs --run-unsupported --compiler gnu --mach ubuntu
cd CLM50SpGs_res1D_CLMGLEAMv35udp

./xmlchange DATM_MODE='ECMWF'
./xmlchange NTASKS=80
./xmlchange DATM_CLMNCEP_YR_ALIGN=2000
./xmlchange DATM_CLMNCEP_YR_START=2000
./xmlchange DATM_CLMNCEP_YR_END=2018
./xmlchange DIN_LOC_ROOT=/home/dayon/inputdata
./xmlchange DIN_LOC_ROOT_CLMFORC=/home/dayon/inputdata/Ecmwf
./xmlchange RUN_STARTDATE=2000-01-01
./xmlchange STOP_N=19
./xmlchange STOP_OPTION=nyears
./xmlchange CLM_FORCE_COLDSTART='on'
./xmlchange ATM_NCPL=24
./xmlchange REST_N=1
./xmlchange REST_OPTION=nyears
./xmlchange ATM_DOMAIN_FILE=domain.lnd.360x180pt_ECMWF.c201225.nc
./xmlchange LND_DOMAIN_FILE=domain.lnd.360x180pt_ECMWF.c201225.nc

./case.setup

vi user_nl_clm
hist_mfilt=1,24 
hist_nhtfrq=0,1
fsurdat = '/home/dayon/inputdata/lnd/clm2/surfdata_map/surfdata_360x180pt_ECMWF_hist_16pfts_Irrig_CMIP6_simyr2000_c201203.nc'

vi user_nl_datm

&datm_nml
  decomp = "1d"
  factorfn = "null"
  force_prognostic_true = .false.
  iradsw = 1
  presaero = .true.
  restfilm = "undefined"
  restfils = "undefined"
  wiso_datm = .false.
/
&shr_strdata_nml
  datamode = "CLMNCEP"
  domainfile = "/home/dayon/inputdata/share/domains/domain.lnd.360x180pt_ECMWF.c201225.nc"
  dtlimit = 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5
  fillalgo = "nn", "nn", "nn", "nn", "nn", "nn", "nn", "nn", "nn"
  fillmask = "nomask", "nomask", "nomask", "nomask", "nomask", "nomask", "nomask", "nomask", "nomask"
  fillread = "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET"
  fillwrite = "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET"
  mapalgo = "bilinear", "bilinear", "bilinear", "bilinear", "bilinear", "bilinear", "bilinear", "bilinear", "bilinear"
  mapmask = "nomask", "nomask", "nomask", "nomask", "nomask", "nomask", "nomask", "nomask", "nomask"
  mapread = "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET"
  mapwrite = "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET"
  readmode = "single", "single", "single", "single", "single", "single", "single", "single", "single"
  streams = "datm.streams.txt.ECMWF.Solar 2000 2000 2018",
      "datm.streams.txt.ECMWF.Precip 2000 2000 2018",
      "datm.streams.txt.ECMWF.Tair 2000 2000 2018",
      "datm.streams.txt.ECMWF.Psurf 2000 2000 2018",
      "datm.streams.txt.ECMWF.Qair 2000 2000 2018",
      "datm.streams.txt.ECMWF.Wind 2000 2000 2018",
      "datm.streams.txt.ECMWF.LWdown 2000 2000 2018",
      "datm.streams.txt.presaero.clim_2000 1 2000 2000",
      "datm.streams.txt.topo.observed 1 1 1"
  taxmode = "cycle", "cycle", "cycle", "cycle", "cycle", "cycle", "cycle", "cycle", "cycle"
  tintalgo = "nearest", "nearest", "nearest", "nearest", "nearest", "nearest", "nearest", "linear", "lower"
  vectors = "null"
/

./case.build --skip-provenance-check
./case.submit --skip-preview-namelist


# ==========================================================
# CLM45Sp_res1D_CTRL
# ==========================================================
./create_newcase --case CLM45Sp_res1D_CTRL --res CLM_USRDAT --compset 2000_DATM%GSWP3v1_CLM45%SP_SICE_SOCN_RTM_SGLC_SWAV --run-unsupported --compiler gnu --mach ubuntu
cd CLM45Sp_res1D_CTRL

./xmlchange DATM_MODE='ECMWF'
./xmlchange NTASKS=80
./xmlchange DATM_CLMNCEP_YR_ALIGN=1980
./xmlchange DATM_CLMNCEP_YR_START=1980
./xmlchange DATM_CLMNCEP_YR_END=2018
./xmlchange DIN_LOC_ROOT=/home/dayon/inputdata
./xmlchange DIN_LOC_ROOT_CLMFORC=/home/dayon/inputdata/Ecmwf
./xmlchange RUN_STARTDATE=1980-01-01
./xmlchange STOP_N=39
./xmlchange STOP_OPTION=nyears
./xmlchange CLM_FORCE_COLDSTART='on'
./xmlchange ATM_NCPL=24
./xmlchange REST_N=1
./xmlchange REST_OPTION=nyears
./xmlchange ATM_DOMAIN_FILE=domain.lnd.360x180pt_ECMWF.c201225.nc
./xmlchange LND_DOMAIN_FILE=domain.lnd.360x180pt_ECMWF.c201225.nc

./case.setup

vi user_nl_clm
hist_fincl2='QVEGE','QVEGT','QSOIL'
hist_dov2xy=.true.,.false.
hist_type1d_pertape='GRID','PFTS'
hist_avgflag_pertape='A','A'
hist_mfilt=1,24 
hist_nhtfrq=0,1
fsurdat = '/home/dayon/inputdata/lnd/clm2/surfdata_map/surfdata_360x180pt_ECMWF_hist_16pfts_Irrig_CMIP6_simyr2000_c201203.nc'

vi user_nl_datm
&datm_nml
  decomp = "1d"
  factorfn = "null"
  force_prognostic_true = .false.
  iradsw = 1
  presaero = .true.
  restfilm = "undefined"
  restfils = "undefined"
  wiso_datm = .false.
/
&shr_strdata_nml
  datamode = "CLMNCEP"
  domainfile = "/home/dayon/inputdata/share/domains/domain.lnd.360x180pt_ECMWF.c201225.nc"
  dtlimit = 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5
  fillalgo = "nn", "nn", "nn", "nn", "nn", "nn", "nn", "nn", "nn"
  fillmask = "nomask", "nomask", "nomask", "nomask", "nomask", "nomask", "nomask", "nomask", "nomask"
  fillread = "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET"
  fillwrite = "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET"
  mapalgo = "bilinear", "bilinear", "bilinear", "bilinear", "bilinear", "bilinear", "bilinear", "bilinear", "bilinear"
  mapmask = "nomask", "nomask", "nomask", "nomask", "nomask", "nomask", "nomask", "nomask", "nomask"
  mapread = "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET"
  mapwrite = "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET"
  readmode = "single", "single", "single", "single", "single", "single", "single", "single", "single"
  streams = "datm.streams.txt.ECMWF.Solar 1980 1980 2018",
      "datm.streams.txt.ECMWF.Precip 1980 1980 2018",
      "datm.streams.txt.ECMWF.Tair 1980 1980 2018",
      "datm.streams.txt.ECMWF.Psurf 1980 1980 2018",
      "datm.streams.txt.ECMWF.Qair 1980 1980 2018",
      "datm.streams.txt.ECMWF.Wind 1980 1980 2018",
      "datm.streams.txt.ECMWF.LWdown 1980 1980 2018",
      "datm.streams.txt.presaero.clim_2000 1 2000 2000",
      "datm.streams.txt.topo.observed 1 1 1"
  taxmode = "cycle", "cycle", "cycle", "cycle", "cycle", "cycle", "cycle", "cycle", "cycle"
  tintalgo = "nearest", "nearest", "nearest", "nearest", "nearest", "nearest", "nearest", "linear", "lower"
  vectors = "null"
/

./case.build --skip-provenance-check
./case.submit --skip-preview-namelist